﻿using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Windows.Controls;
using LSA.OnlineResources;

namespace Visuals.Panes
{
    /// <summary>
    /// Interaction logic for WebResultsControl.xaml
    /// </summary>
    public partial class WebResultsControl : UserControl
    {
        public ObservableCollection<SearchResult> Results { get; set; }

        public WebResultsControl(ObservableCollection<SearchResult> results) : this()
        {
            Results = results;
        }

        public WebResultsControl()
        {
            Results = new ObservableCollection<SearchResult>();
            DataContext = this;
            InitializeComponent();
        }

        private void Hyperlink_RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e)
        {
            Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri));
            e.Handled = true;
        }
    }
}
